package cn.itsource.openfeign;


import cn.itsource.openfeign.fallback.EsCourseFeignClientFallbackFactory;
import cn.itsource.ymcc.common.result.JsonResult;
import cn.itsource.ymcc.domain.CourseDoc;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-search",fallbackFactory = EsCourseFeignClientFallbackFactory.class)
public interface EsCourseFeignClient {
    @PostMapping("/es/batchSaveCourseToEs")
    JsonResult saveCourseToEs(@RequestBody List<CourseDoc> courseDoc);

    @PostMapping("/es/getCourseDocByCourseIds")
    JsonResult getCourseDocByCourseIds(@RequestBody List<Long> ids);
}
